package com.lizhi.menu.Dto;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lizhi.menu.common.entity.PageQuery;
import com.lizhi.menu.domain.TOrder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author lizhi
 * @desc
 * @date 2023-05-19
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class TOrderDto extends PageQuery<TOrder> {

    @TableId
    private Long id;

    /**
     * 下单人id
     */
    private Integer userId;

    /**
     * 下单人姓名
     */
    private String username;

    /**
     * 总金额
     */
    private BigDecimal amount;

    /**
     * 购物车id（以1，2形式）
     */
    private String carIds;

    /**
     * 状态
     */
    private Integer status;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 支付时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime payTime;
}
